package top.vchao.mywebview;

import android.app.Application;
import android.content.Context;
import android.util.DisplayMetrics;


public class MyApp extends Application {

    private static Context context;

    public static int screenWidth = 0;

    public static int screenHeight = 0;

    private static MyApp instance;


    /**
     * 获取屏幕尺寸
     */
    private void getScreenSize() {
        DisplayMetrics dm = getResources().getDisplayMetrics();
        screenHeight = dm.heightPixels;
        screenWidth = dm.widthPixels;
    }

    public static MyApp getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        MyApp.context = getApplicationContext();
    }

    public static Context getAppContext() {
        return MyApp.context;
    }

}
